From: Andreas Schwab Date: Thu, 5 May 2011 16:56:39 +0000 (+0200) Subject: * src/lread.c (lisp_file_lexically_bound_p): Stop scanning at end X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3917 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ebd869e6c3938579572c037ccc9d7acda5d024ef;p=emacs.git * src/lread.c (lisp_file_lexically_bound_p): Stop scanning at end marker. (Bug#8610) --- diff --git a/src/ChangeLog b/src/ChangeLog index bdeb58ab323..ccd01a7fb3e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-05-05 Andreas Schwab + + * lread.c (lisp_file_lexically_bound_p): Stop scanning at end + marker. (Bug#8610) + 2011-05-05 Eli Zaretskii * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: diff --git a/src/lread.c b/src/lread.c index 7ffc98b254f..2139d558851 100644 --- a/src/lread.c +++ b/src/lread.c @@ -830,7 +830,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) ch = READCHAR; i = 0; - while (ch != ':' && ch != '\n' && ch != EOF) + while (ch != ':' && ch != '\n' && ch != EOF && in_file_vars) { if (i < sizeof var - 1) var[i++] = ch; @@ -838,6 +838,10 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) ch = READCHAR; } + /* Stop scanning if no colon was found before end marker. */ + if (!in_file_vars) + break; + while (i > 0 && (var[i - 1] == ' ' || var[i - 1] == '\t')) i--; var[i] = '\0';